<?php

namespace App\Admin\Http\Requests;

class GiftActivityRequest extends Request
{
	/**
   * 用户请求认证
   *
   * @return bool
   */
  public function authorize()
  {
    return true;
  }

  /**
   * 设置请求验证规则
   *
   * @return array
   */
  public function rules()
  {
    $rules = [
      'name' => 'required|max:200',
      'type_id' => 'required',
      'total_money' => 'required|numeric|min:0',
      'begin_time' => 'required|date|before:end_time',
      'end_time' => 'required|date|after:begin_time',
    ];
    return $rules;
  }
}